/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ages.graphics

import com.ages.env.Options
import com.sun.opengl.util.j2d.TextRenderer
import java.awt.Font
import javax.media.opengl.GL

object HudText{
  
  val renderer = new TextRenderer(new Font("SansSerif", Font.BOLD, 16),true,true);

  def draw(gl:GL,text:String,x:Int,y:Int)
  {
    TextRenderHack.fixIt(renderer)
    renderer.beginRendering(Options.width, Options.height)
    renderer.setColor(0.06f,0.06f,0.06f, 1f)
    renderer.draw(text,x,y)
    renderer.setColor(0.9f,0.9f,0.9f, 1f)
    renderer.draw(text,x+2,y+2)
    renderer.endRendering()
  }

}
